<script setup lang="ts">
import { onMounted } from 'vue'
import { hello } from './hooks/useApp'
import {goToMaster,goToLogin} from "./hooks/useApp"
import axios from "axios"


onMounted(()=>{
  console.log("这是App.vue")
  axios.get(`http://123.56.44.159:5000/`).then(res=>{
        console.log(res)
        hello.value = res.data
    }).catch(err=>{
        console.log(err)
    })
})
</script>

<template>
  <div class="All">
    <div class="dailogAll">
      <div class="MasterBox" @click="goToMaster">
        <p class="MasterStyle">主站</p>
      </div>
      <div class="LoginBox" @click="goToLogin">
        <p class="LoginStyle">登录</p>
      </div>
    </div>
    <div class="rv-box">
      <router-view class="rvStyle"></router-view>
    </div>
    <div>
      <p>{{hello}}</p>
    </div>
  </div>
</template>

<style scoped>
@import "./css/AppCss.css";
</style>
